Skip to content

Add command line option to explicitly disable lock_wait_timeout (adds possibility to opt out of breaking changes with older versions) #896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 21, 2025

Conversation

festeveira
Copy link
Contributor

@festeveira festeveira commented Nov 21, 2024

This PR adds a command line option to the exporter allowing the user to disable the lock_wait_timeout MySQL connection parameter making the exporter work again with older versions of mysql, while still behaving the same way by default.

Was really helpful for me, I need to monitor several instances in multi target mode and most of them are unsupported versions. Unless you see a problem with this I think it would be nice to have it merged.

Francisco Esteveira added 3 commits November 21, 2024 19:07
Signed-off-by: Francisco Esteveira <[email protected]>
Signed-off-by: Francisco Esteveira <[email protected]>
@festeveira festeveira changed the title Set lock_wait_timeout option only if positive Set lock_wait_timeout option only if positive (adds possibility to opt out of breaking changes with older versions) Jan 17, 2025
@SuperQ
Copy link
Member

SuperQ commented Feb 19, 2025

I'm not generally a fan of "magic values" like this. I prefer more explicit settings.

@festeveira festeveira changed the title Set lock_wait_timeout option only if positive (adds possibility to opt out of breaking changes with older versions) Add command line option to explicitly disable lock_wait_timeout (adds possibility to opt out of breaking changes with older versions) Feb 20, 2025
@festeveira
Copy link
Contributor Author

Hello, thank you for your feedback! I have added a command line parameter to explicitly disable the option. What do you think?

@SuperQ
Copy link
Member

SuperQ commented Feb 20, 2025

Yes, as a boolean flag is better. Thanks.

@festeveira festeveira requested a review from SuperQ March 30, 2025 20:27
@festeveira
Copy link
Contributor Author

@SuperQ

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SuperQ SuperQ merged commit 1d4c493 into prometheus:main May 21, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants